home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-ARM / SYSTEM.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  2KB  |  71 lines

  1. #ifndef __ASM_ARM_SYSTEM_H
  2. #define __ASM_ARM_SYSTEM_H
  3.  
  4. #include <linux/config.h>
  5.  
  6. /* The type of machine we're running on */
  7. extern unsigned int machine_type;
  8. #define MACH_TYPE_EBSA110    0
  9. #define MACH_TYPE_RISCPC    1
  10. #define MACH_TYPE_NEXUSPCI    3
  11. #define MACH_TYPE_EBSA285    4
  12. #define MACH_TYPE_NETWINDER    5
  13. #define MACH_TYPE_CATS        6
  14. #define MACH_TYPE_TBOX        7
  15.  
  16. #ifdef CONFIG_ARCH_EBSA285
  17. #define machine_is_ebsa285()    (1)
  18. #else
  19. #define machine_is_ebsa285()    (0)
  20. #endif
  21.  
  22. #ifdef CONFIG_ARCH_VNC
  23. #define machine_is_netwinder()    (1)
  24. #else
  25. #define machine_is_netwinder()    (0)
  26. #endif
  27.  
  28. #if defined(CONFIG_CATS)
  29. #define machine_is_cats()    (machine_type == MACH_TYPE_CATS)
  30. #else
  31. #define machine_is_cats()    (0)
  32. #endif
  33.  
  34. #if 0
  35. #define machine_is_ebsa285()    (machine_type == MACH_TYPE_EBSA285)
  36. #define machine_is_netwinder()    (machine_type == MACH_TYPE_NETWINDER)
  37. #endif
  38.  
  39. #include <linux/kernel.h>
  40. #include <asm/proc-fns.h>
  41.  
  42. extern void arm_malalignedptr(const char *, void *, volatile void *);
  43. extern void arm_invalidptr(const char *, int);
  44.  
  45. #define xchg(ptr,x) \
  46.     ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
  47.  
  48. #define tas(ptr) (xchg((ptr),1))
  49.  
  50. /*
  51.  * switch_to(prev, next) should switch from task `prev' to `next'
  52.  * `prev' will never be the same as `next'.
  53.  *
  54.  * `next' and `prev' should be struct task_struct, but it isn't always defined
  55.  */
  56. #define switch_to(prev,next) processor._switch_to(prev,next)
  57.  
  58. /*
  59.  * Include processor dependent parts
  60.  */
  61. #include <asm/proc/system.h>
  62. #include <asm/arch/system.h>
  63.  
  64. #define mb() __asm__ __volatile__ ("" : : : "memory")
  65. #define nop() __asm__ __volatile__("mov r0,r0\n\t");
  66.  
  67. extern asmlinkage void __backtrace(void);
  68.  
  69. #endif
  70.  
  71.